# -*- coding: utf-8 -*-


def extract_unmatched_video_list(log_file_path, date):
    year, month, day = [int(e) for e in date.split('-')]
    log_date_format = '{}_{}_{}'.format(year, month, day)

    with open(log_file_path) as log_file:
        for line in log_file:
            if '/data/record_door/' + log_date_format in line and '.avi' in line:
                video_name = line.rstrip().split('/')[-1]
                print(line.rstrip())


def main():
    log_file_path = './detect_log/2018-05-07-auto.log'
    date = '2018-04-30'
    extract_unmatched_video_list(log_file_path, date)


if __name__ == "__main__":
    main()
